home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / cvsexec / main.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-10-31  |  1.2 KB  |  46 lines

  1. /* 
  2.  * main.c --
  3.  *
  4.  *    Program to exec a command with the given arguments, but with the sprite
  5.  *    userid, since this program will be setuid sprite.
  6.  *
  7.  * Copyright 1991 Regents of the University of California
  8.  * Permission to use, copy, modify, and distribute this
  9.  * software and its documentation for any purpose and without
  10.  * fee is hereby granted, provided that this copyright
  11.  * notice appears in all copies.  The University of California
  12.  * makes no representations about the suitability of this
  13.  * software for any purpose.  It is provided "as is" without
  14.  * express or implied warranty.
  15.  */
  16.  
  17. #ifndef lint
  18. static char rcsid[] = "$Header: /sprite/lib/forms/RCS/proto.c,v 1.5 91/02/09 13:24:44 ouster Exp $ SPRITE (Berkeley)";
  19. #endif /* not lint */
  20.  
  21.  
  22. /*
  23.  *----------------------------------------------------------------------
  24.  *
  25.  * main --
  26.  *
  27.  *    Exec a program with the given arguments.
  28.  *
  29.  * Results:
  30.  *    None.
  31.  *
  32.  * Side effects:
  33.  *    The program is run as whichever user this program is setuid.
  34.  *
  35.  *----------------------------------------------------------------------
  36.  */
  37. main(argc, argv)
  38. int    argc;
  39. char    *argv[];
  40. {
  41.     argv[0] = "cvs";
  42.     execvp(argv[0], argv);
  43.  
  44.     exit(0);
  45. }
  46.